<!DOCTYPE html>
<html>

	<head lang="en">
		<meta charset="UTF-8">
		<title>图片轮换</title>
		<link rel="stylesheet" href="css/scroll.css">
		<script type="text/javascript">function changepicture(name) {
	var pic = document.getElementById("photo");
	var picPath = "images/" + name;
	pic.setAttribute("src", picPath)
}</script>
	</head>

	<body>
		<div class="scroll">
			<div id="num">
				<a href="#" onclick="changepicture('1.gif')">1</a>
				<a href="#" onclick="changepicture('2.gif')">2</a>
				<a href="#" onclick="changepicture('3.jpg')">3</a>
				<a href="#" onclick="changepicture('4.jpg')">4</a>
				<a href="#" onclick="changepicture('5.gif')">5</a>
			</div>
			<img src="images/1.gif" alt="图片" id="photo" />
		</div>
	</body>

</html>